﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MudEngine.Parsing.AST
{
    public class ForEachStatement : Statement
    {
        public AType ArrayType { get; private set; }

        public Expression Array { get; private set; }

        public Statement Statement { get; private set; }

        public string Identifier { get; private set; }

        public ForEachStatement(AType type, string identifier, Expression array, Statement statement)
        {
            this.ArrayType = type;
            this.Identifier = identifier;
            this.Array = array;
            this.Statement = statement;
        }

        public override void AcceptVisitor<C>(IAstNodeVisitor<C> visitor, C ctx)
        {
            visitor.VisitForEachStatement(this, ctx);
        }
    }
}
